
import { BrowserRouter as Router, Route, Routes, Link } from 'react-router-dom'
// import Home from './pages/Home'
// import About from './pages/About'
import Taobao from './pages/Taobao'
import JD from './pages/JD'
import PDD from './pages/PDD'
import UserLayout from './pages/User/UserLayout'
import UserList from './pages/User/UserList'
import UserDetail from './pages/User/UserDetail'
import UserInfo from './pages/User/UserInfo'
function App() {

  return (
    <Router>
      <nav>
        <ul>
          <li>
            <Link to="/taobao">淘宝</Link>
          </li>
          <li>
            <Link to="/jd">京东</Link>
          </li>
          <li>
            <Link to="/pdd">拼多多</Link>
          </li>
          <li>
            <Link to="/user">用户首页</Link>
          </li>
          <li>
            <Link to="/user/detail">用户detail</Link>
          </li>
          <li>
            <Link to="/user/123">用户info</Link>
          </li>
        </ul>
      </nav>
      <Routes>
        <Route path="/taobao" element={<Taobao />} />
        <Route path="/jd" element={<JD />} />
        <Route path="/pdd" element={<PDD />} />
        <Route path='/user' element={<UserLayout />}>
          <Route index element={<UserList />} ></Route>
          <Route path='detail' element={<UserDetail />}></Route>
          <Route path=':id' element={<UserInfo />}></Route>
        </Route>
      </Routes>
    </Router>
  )
}

export default App
